const express = require('express')
const logger = require('morgan')
const path = require('path')
const route = require('./route/myRoute')

const app = express();

app.use(logger('dev'))

app.use(express.urlencoded({extends:true}))

app.use(route)

app.use(express.static(path.join(__dirname,'public')))

app.set('port',8080)

app.listen(app.get('port'),function(){
    console.log('访问成功！！！ http://localhost:8080')
})
